/**
 * @filename:CourseService Course
 * @project constract  V1.0
 * Copyright(c) 2018 gong Co. Ltd. 
 * All right reserved. 
 */
package com.znufe.exam.service;

import java.util.List;

import com.github.pagehelper.PageInfo;
import com.znufe.exam.domain.Course;
import com.znufe.exam.domain.Lecturer;
import com.znufe.exam.domain.course.CourseDirectoryObject;
import com.znufe.exam.domain.course.CoursePageResponseObject;
import com.znufe.exam.domain.course.CourseResponseObject;
import com.znufe.exam.viewmodel.student.course.CoursePageRequestVm;
import com.znufe.exam.viewmodel.student.course.CourseProjectRequestVm;
import com.znufe.exam.viewmodel.student.course.CourseSearchRequestVm;
import io.swagger.models.auth.In;

/**
 *  
 * @Description:  课程表——SERVICE
 * @Author:       gong   
 * @CreateDate:   Course
 * @Version:      V1.0
 *    
 */
public interface CourseService extends BaseService<Course>{
	
	/**
	 * 查询课程表对象
	 * @param   id
	 * @return  Course
	 * @author  gong
	 */
	Course selectByPrimaryKey(Integer id);
	
	/**
	 * 删除课程表对象
	 * @param   id
	 * @return  int
	 * @author  gong
	 */
	int deleteByPrimaryKey(Integer id);
	
	/**
	 * 添加课程表对象
	 * @param   course
	 * @return  int
	 * @author  gong
	 */
	int insertSelective(Course course);
	
	/**
	 * 修改课程表对象
	 * @param   course
	 * @return  int
	 * @author  gong
	 */
	int updateByPrimaryKeySelective(Course course);
	
	/**
	 * @explain 查询课程表集合
	 * @param   course
	 * @return  List<Course>
	 * @author  gong
	 */
	List<Course> queryCourseList(Course course);

    /**
     * 查询4条相应级别课程
     * @param courseType
     * @param courseProject
     * @return
     */
	List<Course> queryCourseByProjectAndTypeLimit(Integer courseProject,Integer courseType);

	List<Course> queryCourseByProjectAndType(Integer courseProject,Integer courseType,String orderByField);

    /**
     * 根据课程级别分页展示课程
     * @param requestVm
     * @return
     */
	PageInfo<Course> getCoursePageByType(CoursePageRequestVm requestVm);

    /**
     * 根据课程级别和名称搜索课程
     * @param requestVm
     * @return
     */
    PageInfo<Course> queryCourseByTypeAndName(CourseSearchRequestVm requestVm);

    /**
     * 分页展示课程信息
     * @param requestVM
     * @return
     */
    PageInfo<CoursePageResponseObject> coursePage(CoursePageRequestVm requestVM);

    /**
     * 根据项目类别、课程名称、课程类别查询课程
     * @param courseProject
     * @param courseName
     * @param courseType
     * @return
     */
    Course getCourseByProjectAndNameAndType(Integer courseProject,String courseName,Integer courseType);

    List<CourseResponseObject> getCourseOutlineById(Integer courseId);

    List<CourseDirectoryObject> getCourseDirectoryById(Integer courseId);

    /**
     * 类别删除时，同时删除该类别所有课程
     * @param categoryId
     * @return
     */
    int deleteAllCourseByCategory(Integer categoryId);
}